package lfm.mpr;

import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.concurrent.ExecutionException;

import db.AdminBaseDatosHelper;
import objects.Partido;
import AsyncTask.TaskProgressBar_Get_Credit_User;
import Soap.Connection_Sever_Dynamics;
import Toast.ToastLFM_Message;
import adapter.AdapterListJornadas;
import adapter.AdapterListPartidos;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.SystemClock;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;

public class CreditUserActivity extends Activity {
	
	private SharedPreferences prefs;
	private EditText Text_user_credit;
	private Button Button_credit_user;
	
	public void onCreate(Bundle savedInstanceState) {
		 
        super.onCreate(savedInstanceState);
        setContentView(R.layout.credit_user);  
       
        Text_user_credit = (EditText)findViewById(R.id.editText_credit);
        
        prefs = getSharedPreferences("MisPreferencias",Context.MODE_PRIVATE);
        int credit = prefs.getInt("credit", 0);
        Text_user_credit.setText(new Integer(credit).toString());
        
        Button_credit_user = (Button) findViewById(R.id.button_credit);
        
        try {
			Integer credit_user = new TaskProgressBar_Get_Credit_User(CreditUserActivity.this, prefs).execute().get();
			Text_user_credit.setText(credit_user.toString());
		} catch (InterruptedException e) {
			e.printStackTrace();
		} catch (ExecutionException e) {
			e.printStackTrace();
		}
        
        
        //Capturamos el evento del boton "Obtener Creditos"
        Button_credit_user.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v)
            {
            	
            }//end_onclick
        });//end_onclick_Button_credit_user
        
	}//end_onCreate
	
}//end_CreditUserActivity
